#ifndef __AS_UTIL__H__
#define __AS_UTIL__H__

#include "ASDataType.h"
#include "ASStdLib.h"
//#include "..\tool\ASLog.h"


//typedef enum
//{
//    AS_TIMER_SHORT_TERM,
//    AS_TIMER_LONG_TERM,
//
//    AS_TIMER_TYPE_MAX
//}as_timer_type;
typedef void (*as_timer_cb)(ASINT param);

/*short term timer*/
ASINT as_create_timer(ASINT millsecs, as_timer_cb cb);
ASVOID as_destroy_timer(ASINT tid);

/*long term timer*/
//ASINT as_create_timer_ex(ASINT millsecs,as_timer_cb cb);
//ASVOID as_destroy_timer_ex(ASINT tid);

ASVOID as_get_phone_type(ASINT* if_touch, ASINT* if_keybrd);
ASBOOL as_if_has_simcard(ASVOID);

#define AS_IS_DIGIT(c)  ( (ASUINT8) ((c) - '0') < 10)
#define AS_IS_ALPHA(c)  ( (ASUINT8) ( ((c)|32) - 'a') < 26 )
#define AS_IS_ALNUM(c)  ( AS_IS_DIGIT(c) || AS_IS_ALPHA(c) )
#define AS_SAFE_FREE(p)   if (p) {as_free((void *)p); p = 0;}


#endif//__AS_UTIL__H__